package com.zzyl.mapper;

import com.zzyl.entity.NursingPlan;
import com.zzyl.entity.OriginalBean;
import com.zzyl.entity.ProjectPlan;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description ProjectPlanListMapper
 * @Author liangDong
 * @Date 2025-05-08  17:22
 */
@Mapper
public interface ProjectPlanListMapper {

    void insertBatch(List<ProjectPlan> planList);

    List<ProjectPlan> getByPlanId(Long id);

    @Delete("delete from nursing_project_plan where plan_id = #{planId}")
    void delete(Long planId);

    @Select("select project_id as id,create_by,create_time from nursing_project_plan where plan_id = #{plan_id}")
    List<OriginalBean> getOriginalOfProjectPlans(Long planId);

    @Delete("delete from nursing_project_plan where plan_id = #{planId}")
    void deleteByPlanId(Long planId);
}
